﻿
@{
    ViewData["Title"] = TempData["CurrentKeyword"];
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using X.PagedList.Mvc.Core;
@using X.PagedList;
@model ArticleListPageVM
@section css{
    <link href="~/css/PagedList.min.css" rel="stylesheet" asp-append-version="true" />
}

    <div class="zhuanti whitebg">
        <h2 class="htitle" style="color:red;font-weight:500"><span class="hnav"></span>@TempData["CurrentKeyword"]</h2>
        <ul>
            @foreach (var item in Model.ArticleList)
            {
                <li>
                    <i class="ztpic">
                        <a href="@domainConfig.CurrentValue.Host@Url.Action("Detail","Home",new{Id=item.Id,parentColumnUrl=item.ParentColumnUrl,childColumnUrl=item.EnTitle})" target="_blank" title="@item.Title">
                            @if (!string.IsNullOrEmpty(item.ThumImg))
                            {
                                @if (item.ThumImg.Contains(domainConfig.CurrentValue.ImgHost))
                                {
                                    <img src="@item.ThumImg" alt="@item.Title" />
                                }
                                else
                                {
                                    <img src="@domainConfig.CurrentValue.ImgHost@item.ThumImg" alt="@item.Title" />
                                }                               
                            }
                            else
                            {
                                <img src="/image/banner_1.jpg" alt="@item.Title" />
                            }
                        </a>
                    </i> <b>@item.Title</b>
                    <span>
                        @Html.Raw(item.Summary)
                    </span>
                    <a href="@domainConfig.CurrentValue.Host@Url.Action("Detail","Home",new{Id=item.Id,parentColumnUrl=item.ParentColumnUrl,childColumnUrl=item.EnTitle})" target="_blank" title="@item.Title" class="readmore">阅读原文</a>
                </li>
            }
        </ul>
    </div>
    <div class="pagelist">
        @Html.PagedListPager((IPagedList<CmsArtcileVM>)ViewData["Page"], page => Url.Action("Search", new { page, keyword = TempData["CurrentKeyword"] }))
    </div>
